package info.demo.service;


import info.demo.entity.EntidadePersistente;

import java.io.Serializable;
import java.util.List;

public interface GenericService<T extends EntidadePersistente, ID extends Serializable> extends Serializable {

    public T getById(ID id, boolean lock) throws ServiceException;

    public T getById(ID id) throws ServiceException;

    public List<T> findAll() throws ServiceException;

    public T saveOrUpdate(T entity) throws ServiceException;

    public T save(T entity) throws ServiceException;

    public T update(T entity) throws ServiceException;

    public T delete(T entity) throws ServiceException;

    public void deleteById(ID id) throws ServiceException;

}
